package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.query.OmnipotentParam;
import com.hoshiicloud.common.update.UpdateBatchParam;
import com.hoshiicloud.goods.entity.spu.SpuSalesCategory;

import java.util.List;

/**
 * <p>
 * 营销类目 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface SpuSalesCategoryService extends IService<SpuSalesCategory> {

    SpuSalesCategory getById(Long id);

    boolean save(SpuSalesCategory entity);

    boolean updateById(SpuSalesCategory entity);

    IPage getPage(IPage page, Wrapper queryWrapper, String key);

    boolean deleteById(Long id);

    List<SpuSalesCategory> getByIds(List<Long> ids, String key);

    List<SpuSalesCategory> getByParam(Wrapper wrapper);

    List<SpuSalesCategory> listBySpuIds(List<Long> spuIds);

    Boolean saveBatch1(List<SpuSalesCategory> list);


    /**
     * 根据自定义条件进行批量更新
     */
    boolean updateBatchByWrapper(UpdateBatchParam<SpuSalesCategory> updateBatchParam);

    /**
     *  批量更新
     */
    Boolean updateBatch(OmnipotentParam<SpuSalesCategory> param);
}
